#include "reader.h"
#include <string.h>
#include<iomanip>
using namespace std;
Reader::Reader(const char* _name,int _id,int money,int _num):money(money)
{
	name = new char[strlen(_name)+1];
	strcpy(name,_name);
	id = _id;
	num = _num;
}

char* Reader::get_name(void)
{
	return name;
}

int Reader::get_id(void)
{
	return id;
}

int Reader::get_money(void)
{
	return money;
}

void Reader::set_name(char *m_name)
{
	name = new char[strlen(m_name)+1];
	strcpy(name,m_name);
}

void Reader::set_id(int m_id)
{
	id = m_id;
}

void Reader::set_money(int m_money)
{
	money = m_money;
}

void Reader::set_num(int m_num)
{
	num = m_num;
}

int Reader::get_num(void)
{
	return num;
}


void Reader::show(void)
{
	cout << "\e[35m读者姓名：\e[0m" << name << "      "<< "\e[35m读者id：\e[0m" << id <<  "      " << "\e[35m余额：\e[0m" << money << endl;
}

vector<Book>& Reader::getvector(void)
{
	return books;
}
Reader::~Reader(void)
{
	
}
